package com.bbs.feign;

import com.bbs.pojo.Result;
import com.bbs.pojo.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(value = "user-service")
public interface UserClient {
    @GetMapping("/api/users/{id}")
    Result<UserDto> getUser(@PathVariable("id") String id);

    @PutMapping("/api/sys/users/{id}/add-experience/{experience}")
    Result<Object> addExperience(@PathVariable("id") String id, @PathVariable("experience") Integer experience);
}
